/**
 * Created by caoyang on 17/3/28.
 */

import React, {Component, PureComponent} from 'react';
import {
    StyleSheet,
    Text,
    View,
    ScrollView,
    TouchableOpacity,
} from 'react-native';

import NavigationBar from '../../common/NavigationBar';
import SelectItem from '../../common/SelectItem';

export default class Setting extends Component {

    render() {
        return (
            <View style={styles.container}>
                <NavigationBar
                    title={'设置'}
                    hiddenLeft={true}
                />

                <ScrollView>
                    <View style={{height: 15}}/>
                    <SelectItem
                        title="扫一扫"
                        icon={require('./img/ic_scan_q.png')}
                        onPress={this._scan}
                    />

                    <View style={{height: 25}}/>
                    <SelectItem
                        title="更新个人信息"
                        icon={require('./img/ic_shuffle_q.png')}
                        onPress={this._updateProfile}
                        showLine={true}
                    />
                    <SelectItem
                        title="修改登录密码"
                        icon={require('./img/ic_drawer_login_zhihu_q.png')}
                        onPress={this._updatePassword}
                    />

                    <View style={{height: 25}}/>
                    <SelectItem
                        title="退出登录"
                        icon={require('./img/ic_befollowed_icon_q.png')}
                        onPress={this._logout}
                    />
                </ScrollView>
            </View>
        );
    }

    _scan = () => {
        console.log('扫一扫');
    }

    _updateProfile = () => {
        console.log('更新个人信息');
    }

    _updatePassword = () => {
        console.log('修改登录密码');
    }

    _logout = () => {
        console.log('退出登录');
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'rgb(239, 239, 244)',
    },
});
